package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpShopInformationDao;
import com.financing.platform.dto.FpShopInformationDTO;
import com.financing.platform.util.SqlName;
/**
 * fp_shop_information  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopInformationDao")
public class FpShopInformationDaoImpl extends BaseDaoImpl implements IFpShopInformationDao {


	@Override
	public int insert(FpShopInformationDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpShopInformationSql.insert, fpShopInformation);
	}

	@Override
	public void update(FpShopInformationDTO fpShopInformation) throws SQLException {
		this.sqlMapClient.update(SqlName.FpShopInformationSql.update, fpShopInformation);
	}

	@Override
	public void updateForce(FpShopInformationDTO fpShopInformation) throws SQLException {
		this.sqlMapClient.update(SqlName.FpShopInformationSql.updateForce, fpShopInformation);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpShopInformationSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopInformationDTO> queryList(FpShopInformationDTO fpShopInformation) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpShopInformationSql.queryList, fpShopInformation);
	}

	@Override
	public int queryListCount(FpShopInformationDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpShopInformationSql.queryListCount, fpShopInformation);
	}

	@Override
	public FpShopInformationDTO loadById(Integer id) throws SQLException {
		return  (FpShopInformationDTO)this.sqlMapClient.queryForObject(SqlName.FpShopInformationSql.loadById,id);
	}
 	
}
